﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Details.aspx.vb" Inherits="Assignment_2___Prototype.Details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataSourceID="SqlDataSource2" Height="50px" Width="236px" BackColor="White" 
        BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
        GridLines="Vertical" HorizontalAlign="Center">
        <AlternatingRowStyle BackColor="Gainsboro" Font-Bold="False" />
        <CommandRowStyle Font-Bold="False" />
        <EditRowStyle BackColor="#008A8C" Font-Bold="True" Font-Names="Calibri" 
            Font-Size="Medium" ForeColor="White" />
        <FieldHeaderStyle Font-Bold="True" />
        <Fields>
            <asp:BoundField DataField="CarType" HeaderText="Type" SortExpression="CarType" >
            <ControlStyle Font-Bold="True" Font-Size="Medium" />
            <ItemStyle Font-Bold="True" Font-Size="Medium" />
            </asp:BoundField>
            <asp:BoundField DataField="CarModel" HeaderText="Model" 
                SortExpression="CarModel" />
            <asp:BoundField DataField="CarTransmission" HeaderText="Transmission" 
                SortExpression="CarTransmission" />
            <asp:BoundField DataField="CarEngine" HeaderText="Engine" 
                SortExpression="CarEngine" />
            <asp:BoundField DataField="CarYear" HeaderText="Year" 
                SortExpression="CarYear" />
            <asp:BoundField DataField="CarFuel" HeaderText="Fuel" 
                SortExpression="CarFuel" />
            <asp:BoundField DataField="CarColour" HeaderText="Colour" 
                SortExpression="CarColour" />
            <asp:BoundField DataField="CarWheelSize" HeaderText="WheelSize" 
                SortExpression="CarWheelSize" />
            <asp:CheckBoxField DataField="CarBluetooth" HeaderText="Bluetooth" 
                SortExpression="CarBluetooth" ControlStyle-CssClass="squaredTwo" />
            <asp:CheckBoxField DataField="CarNavigation" HeaderText="Navigation" 
                SortExpression="CarNavigation" ControlStyle-CssClass="squaredTwo"/>
            <asp:CheckBoxField DataField="CarSecurity" HeaderText="Security" 
                SortExpression="CarSecurity" ControlStyle-CssClass="squaredTwo"/>
            <asp:CheckBoxField DataField="CarSunroof" HeaderText="Sunroof" 
                SortExpression="CarSunroof" ControlStyle-CssClass="squaredTwo" />
            <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                <ControlStyle CssClass="carImageBig" />
            </asp:ImageField>
        </Fields>
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" Font-Size="Medium" 
            ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <RowStyle BackColor="#EEEEEE" Font-Size="Medium" ForeColor="Black" />
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        
        SelectCommand="SELECT [CarType], [CarModel], [CarTransmission], [CarEngine], [CarYear], [CarFuel], [CarColour], [CarWheelSize], [CarBluetooth], [CarNavigation], [CarSecurity], [CarSunroof], [Picture] FROM [Car] WHERE ([CarID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="CarID" QueryStringField="CarID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="CarID" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="CarID" HeaderText="CarID" InsertVisible="False" 
                ReadOnly="True" SortExpression="CarID" />
            <asp:BoundField DataField="CarModel" HeaderText="CarModel" 
                SortExpression="CarModel" />
            <asp:BoundField DataField="CarType" HeaderText="CarType" 
                SortExpression="CarType" />
            <asp:BoundField DataField="CarColour" HeaderText="CarColour" 
                SortExpression="CarColour" />
            <asp:BoundField DataField="CarFuel" HeaderText="CarFuel" 
                SortExpression="CarFuel" />
            <asp:BoundField DataField="CarYear" HeaderText="CarYear" 
                SortExpression="CarYear" />
            <asp:BoundField DataField="CarEngine" HeaderText="CarEngine" 
                SortExpression="CarEngine" />
            <asp:BoundField DataField="CarTransmission" HeaderText="CarTransmission" 
                SortExpression="CarTransmission" />
            <asp:BoundField DataField="CarWheelSize" HeaderText="CarWheelSize" 
                SortExpression="CarWheelSize" />
            <asp:CheckBoxField DataField="CarBluetooth" HeaderText="CarBluetooth" 
                SortExpression="CarBluetooth" />
            <asp:CheckBoxField DataField="CarNavigation" HeaderText="CarNavigation" 
                SortExpression="CarNavigation" />
            <asp:CheckBoxField DataField="CarSecurity" HeaderText="CarSecurity" 
                SortExpression="CarSecurity" />
            <asp:CheckBoxField DataField="CarSunroof" HeaderText="CarSunroof" 
                SortExpression="CarSunroof" />
            <asp:BoundField DataField="Picture" HeaderText="Picture" 
                SortExpression="Picture" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT * FROM [Car] WHERE ([CarID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="CarID" QueryStringField="?" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <br />
</asp:Content>
